<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/echarts.min.js"></script>
</head>
<body>
    <script>
        $(function(){
            //1 . 得到容器
            var chartDom = document.getElementById('main');
            //2. 初识化echarts
            var myChart = echarts.init(chartDom);
            var option;

            //3.折线图的数据项
            option = {
                xAxis: {
                    type: 'category',
                    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                },
                yAxis: {
                    type: 'value'
                },
                series: [{
                    data: [150, 230, 224, 218, 135, 147, 260],
                    type: 'line'
                }]
            };

            //4.设置数据项
            myChart.setOption(option);
        });
    </script>

    <div id="main" style="width: 800px;height: 500px;">

    </div>
</body>
</html>